﻿[assembly: Microsoft.Owin.OwinStartup(typeof(Home.Startup))]

namespace Home
{
    using System;
    using System.IO;
    using System.Reflection;
    using Home.Services.SaleService;
    using Home.Services.SecurityService;
    using Microsoft.Owin;
    using Microsoft.Owin.Security.Cookies;
    using Owin;

    public class Startup
    {
        public const string DefaultAuthenticationType = "ApplicationCookie";

        public void Configuration(IAppBuilder app)
        {
            //// security

            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = DefaultAuthenticationType,
                ExpireTimeSpan = TimeSpan.FromMinutes(1),
            });

            //// odata service

            app.ConfigureSalesService();
            app.ConfigureSecurityService();
        }
    }
}
